home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / LIFE_SIM / VERSION_ / HANDLEUP.C < prev    next >
Text File  |  1992-03-12  |  575b  |  33 lines

  1. /* Cell Proj 1.0 */
  2.  
  3. #include "MacProto.h"
  4. #include "Cell_Proto.h"
  5. #include "Cell_Definitions.h"
  6. #include "Cell_Variables.h"
  7.  
  8.  
  9. HandleUpdateEvt()
  10. {
  11.     if ( ( WindowPtr ) gTheEvent.message == gCellWindow )
  12.     {
  13.         BeginUpdate( ( WindowPtr ) gTheEvent.message );
  14.         SetPort( gCellWindow );
  15.         EndUpdate( ( WindowPtr ) gTheEvent.message );
  16.     }
  17. }
  18.  
  19. HandleActivateEvt()
  20. {
  21.     if ( (WindowPtr)gTheEvent.message == gCellWindow )
  22.     {
  23.         if (( gTheEvent.modifiers & activeFlag ) != 0 )
  24.         {
  25.             SetPort( gCellWindow );
  26.             SelectWindow( gCellWindow );
  27.         }
  28.         else
  29.         {
  30.             SetPort( gCellWindow );
  31.         }
  32.     }
  33. }